#coding:UTF-8
from collections import Counter
import netifaces
import pprint
import os
id = netifaces.interfaces()
# pprint.pprint(id[2])
re=len(id)
for i in range(re):
    res = netifaces.ifaddresses(id[i])
    ipv4 = res[2][0]['addr']
    ipv6 = res[-1000][0]['addr']
    print(ipv4)
    print(ipv6)